
// App.js

import React, { useState } from 'react';
import { BrowserRouter as Router, Route, Routes, Link } from 'react-router-dom';
import LoginPage from './components/LoginPage';
import RegisterPage from './components/RegisterPage';
import WordListPage from './components/WordListPage';
import StudyPage from './components/StudyPage';
import QuizPage from './components/QuizPage';
import DefaultPage from './components/DefaultPage';

function App() {
  // const [isLoggedIn, setIsLoggedIn] = useState(false); // 假设默认未登录
  return (
    <Router>
       <div>
        <nav>
          <ul>
          <li>
              <Link to="/" >Home</Link>
            </li>
            <li>
              <Link to="/wordList">WordListPage</Link>
            </li>
            <li>
              <Link to="/study">StudyPage</Link>
            </li>
            <li>
              <Link to="/quiz">QuizPage</Link>
            </li>
          </ul>
        </nav>
      <Routes>
        <Route path="/login" element={<LoginPage/>} />
        <Route path="/register" element={<RegisterPage/>} />
        <Route path="/study" element={<StudyPage></StudyPage>} />
        <Route path="/quiz" element={<QuizPage></QuizPage>} />
        <Route path="/wordList" element={<WordListPage></WordListPage>} />
        <Route path="/"   element={<DefaultPage/>} />
      </Routes>
      </div>
    </Router>
 
  );
}

export default App;
